import { GSprite } from "../../../../com/mui/controls/GSprite";
import { ObjCreate } from "../common/ObjCreate";
import { ImagesConst } from "../../resource/ImagesConst";
import { LoaderHelp } from "../../../common/display/LoaderHelp";
import { ResFileConst } from "../../resource/ResFileConst";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
type int = number;
//class RechargeShowLabelItem
    
    export  class RechargeShowLabelItem extends GSprite
    {
        constructor()
        {
            super();
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            ObjCreate.createBitmap(ImagesConst.PurpleBg, 0, 0, this);
            this._labelBmp = new Object /* flash.display.Bitmap */();
            this._labelBmp.x = 9;
            this._labelBmp.y = 9;
            addChild(this._labelBmp);
            return;
        }

        public updateLabel(arg1: int): void
        {
            this._index = arg1;
            LoaderHelp.addResCallBack(ResFileConst.RechargeGiftShow, this.onResLoaded);
            return;
        }

        /* internal  */onResLoaded(): void
        {
            this._labelBmp.bitmapData = GlobalClass.getBitmapData("RechargeLabel_" + this._index);
            return;
        }

        /* internal */ /* var */_labelBmp: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_index: int=1;
    }
